package com.cmc6.common.config;

import cn.hutool.core.date.BetweenFormatter;
import cn.hutool.core.date.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@Slf4j
public class StartupCompleteApplicationRunner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) {
        log.info("项目启动完成，耗时：{}",
            DateUtil.formatBetween(BaseConfig.startTime, new Date(), BetweenFormatter.Level.MILLISECOND));
    }
}
